﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="keywordlist.aspx.cs" Inherits="weikeweixin.web.admin.wechat.keywordlist" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta content="IdeaSoft软件" name="Keywords">
	<meta content="IdeaSoft软件二维码" name="Description">
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/bootstrap.responsive.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/style.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/todc_bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/themes.css" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/inside.css" />
 
    <script type="text/javascript" src="/Scripts/JQuery.min.js"></script>
    <script type="text/javascript" src="/Scripts/Bootstrap.min.js"></script>
    <script type="text/javascript" src="/Scripts/JQuery.cookie.js"></script>
    <script type="text/javascript" src="/Scripts/JQuery.form.wizard.min.js"></script>
    <script type="text/javascript" src="/Scripts/Inside.js"></script>
    <script src="/Scripts/Su.common.js" type="text/javascript"></script>

<title>微客网络工作室</title>
</head>
<body>
	
    <div id="main">
        <div class="container-fluid">

            <div class="row-fluid">
                <div class="span12">

                    <div class="box">

                        <div class="box-title">
                            <div class="span10">
                                <h3><i class="icon-edit"></i>关键字管理</h3>
                            </div>
                            
                        </div>
                        <div class="box-content">
                            <div class="alert" style="display:none;">
                                1.进行中或已经结束的特权不可以修改！<br>
                                2.您最多可以创建8条特权!
                            </div>
                            <div class="row-fluid">
                                <div class="span12 control-group">
                                    <div class="span4">
                                     <a class="btn" style="height:21px;" href="keyword.aspx"><i class="icon-plus"></i>添加关键字</a>
                                        <a class="btn" style="height:21px;" href="javascript:location.reload()"><i class="icon-refresh"></i></a>
                                    </div>
                                </div>
                            </div>

                            <div class="row-fluid dataTables_wrapper">
                                <table id="listTable" class="table table-bordered   table-hover  dataTable">
                                    <thead>
                                        <tr>
                                            <th>关键字</th>
                                            <th>回复类型</th>
                                            <th>新增时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                </table>

		                        <div class="dataTables_paginate paging_full_numbers"><span>       </span></div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>


	
</body>
</html>

<script type="text/javascript">
    $(document).ready(function () {
        var url = "keywordlist.aspx";
        $.ajax({
            url: url + "?action=list",
            type: "post",
            success: function (msg) {
                msg = eval("(" + msg + ")");
                var str = "";
                for (var i = 0; i < msg.length; i++) {
                    str += '<tr><td>' + msg[i].keyword_name + '</td><td style="width:600px">' + gettype(msg[i].keyword_type) + '</td>';
                    str += '<td>' + msg[i].keyword_addtime + '</td><td>';
                    str += '<a href="keyword.aspx?id=' + msg[i].keyword_id + '" class="btn" rel="tooltip" title="编辑">编辑</a>';
                    str += '<a href="javascript:Delete(' + msg[i].keyword_id + ')" class="btn" rel="tooltip" attr="delannounce_29393_" title="删除">删除</td></tr>';
                }
                $("#listTable").append(str);
            }
        });
    })
    function gettype(type) {
        switch (type) {
            case "text":
                return "文本";
            case "news":
                return "链接";
        }
    }
    function Delete(Id) {
        G.ui.tips.confirm("确定要删除吗？", "keywordlist.aspx?action=del&Id=" + Id);
    }
    </script>